package com.zoffy.wmsbackend.service.impl;

import com.alibaba.excel.EasyExcel;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.zoffy.wmsbackend.model.dto.stock.StockQueryDTO;
import com.zoffy.wmsbackend.model.entity.Stock;
import com.zoffy.wmsbackend.model.excel.StockInImportListener;
import com.zoffy.wmsbackend.model.excel.bean.StockPurchaseVo;
import com.zoffy.wmsbackend.model.vo.stock.StockVO;
import com.zoffy.wmsbackend.service.StockService;
import com.zoffy.wmsbackend.mapper.StockMapper;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Service;
import org.springframework.web.multipart.MultipartFile;

import java.io.IOException;
import java.util.List;

/**
* @author 86170
* @description 针对表【stock(库存表)】的数据库操作Service实现
* @createDate 2025-01-02 01:34:39
*/
@Service
public class StockServiceImpl extends ServiceImpl<StockMapper, Stock>
    implements StockService {
        @Resource
        private StockMapper stockMapper;
    
     @Override
    public IPage<StockVO> selectStockPage(StockQueryDTO queryDTO) {
        return baseMapper.selectStockPage(queryDTO.toPage(), queryDTO.getGoodsCode(), queryDTO.getGoodsName(),queryDTO.getWarehouseCode(),queryDTO.getWarehouseName(),queryDTO.getStatus());
    }
    @Override
    public List<StockPurchaseVo> selectStockBelowSafeLevel() {
        return stockMapper.selectStockBelowSafeLevel();
    }
}




